<?php
header("Content-Type: text/html;charset=utf-8"); 
require 'lyb_conn.php';
echo $time_start=date("h:i:sa"); 
//$sql="insert into n1 (id,user,title,content) values (1,2,3,4)";
for ($n = 1; $n < 10000; $n++) {
    $user='留言板测试用户user'.$n;
    $title='留言板测试标题title'.$n;
    $content='留言板测试内容content'.$n;
    $id= uniqid();
    $sql="insert into n1 (id,user,title,content) values ('$id','$user','$title','$content')";
    mysqli_query($con, $sql);
}
echo '<br>';
echo $time_end=date("h:i:sa"); 
//经测试，1w条数据插入完毕，耗时15S
?>

